package com.cup.newSecurity.serviceImpl;

import com.cup.newSecurity.constant.LdapConstants;
import com.cup.newSecurity.util.LdapConnectionFactory;
import com.cup.newSecurity.util.LdapServer;
import com.novell.ldap.LDAPAttribute;
import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPModification;
import com.novell.ldap.connectionpool.PoolManager;

public class PasswordWrite {
	public static void main(String[] args) throws Exception {
		String userId = "tt";
		String instId = "0800010001";
		String userEntryDn = LdapConstants.UID + LdapConstants.EQUAL + userId + LdapConstants.FLAG
		+ LdapConstants.OU + LdapConstants.EQUAL + instId + LdapConstants.FLAG
		+ LdapConstants.INSTITUTE + LdapConstants.FLAG + LdapConstants.SEARCHBAKSE;
		
		UserServiceImpl userSrv = new UserServiceImpl();
		userSrv.modifyUserPassword(BaseUserInfoOM.create(userId, instId), "123456", "1234561");
		userSrv.modifyUserPassword(BaseUserInfoOM.create(userId, instId), "1234111", "2345111");
		userSrv.modifyUserPassword(BaseUserInfoOM.create(userId, instId), "2345111", "6789111");
		userSrv.modifyUserPassword(BaseUserInfoOM.create(userId, instId), "6789111", "9870111");
		userSrv.modifyUserPassword(BaseUserInfoOM.create(userId, instId), "9870111", "1234111");

	}
}
